package com.yjha.ai.demos.web.controller;

import com.yjha.ai.demos.web.service.DBChatService;
import com.yjha.ai.demos.web.value.APIValue;
import jakarta.annotation.Resource;
import org.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class DBChatController {
    @Resource
    private DBChatService service;

    @PostMapping("/dbChat")
    public Map<String , Object> dbChat(@RequestBody APIValue apiValue){

        return service.execute(apiValue);
    }

}
